/*
 * @Author: your name
 * @Date: 2021-12-20 19:52:54
 * @LastEditTime: 2021-12-21 19:07:30
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day10 react\my-app\src\views\index\my\my.js
 */
import React, { Component } from 'react';
 
class My extends Component {

    toColl(){
        this.props.history.push({
            pathname:"/coll"
        })
    }

    render() { 
        return (
            <div>
                <button onClick={this.toColl.bind(this)}>收藏</button>
            </div>
        );
    }
}
 
export default My;